import java.net.SocketException;
import java.net.UnknownHostException;

/*
 * This class will be used as a test for the transmission of data
 */


public class Client 
{
	public static void main(String []args) throws UnknownHostException, SocketException
	{
		byte [] mac = {-128, -128, -128, -128, -128, -128};
    	byte [] type = {-128, -128};
    	String payload = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
    	    	
    	
    	//Currently the subnet and mtu are not needed for communication
    	//This was a test to connect two mac's in the mac lab
    	Port client = new Port(4005, "130.166.68.48", 30, 1500);
    	client.connect(4006, "130.166.68.49");

    	EthernetFrame message = new EthernetFrame(new MacAddress(mac), new MacAddress(mac), type, payload.getBytes());
    	
    	System.out.print("Outgoing Ethernet Info:\n" + message);

    	client.transmit(message);
    	
    	client.disconnect();
	}
}
